import { atom, useRecoilState, useRecoilValue } from 'recoil'

const themeState = atom<'light' | 'dark' | 'auto'>({
  key: 'textState',
  default: 'auto',
})

export function useThemeState() {
  return useRecoilState(themeState)
}

export function useThemeValue() {
  return useRecoilValue(themeState)
}
